import Vue from 'vue'

import App from './App.vue'
import router from './router'
//后台地址
//http://www.kehuitewlw.com/manage/page/index
//接口地址
//admin khtAdmin
//https://www.showdoc.com.cn/1092763312114367?page_id=0
//https://www.showdoc.com.cn/1092763312114367?page_id=0


import Vant from 'vant';

import 'vant/lib/index.css';
import { Notify } from 'vant';


import { Dialog } from 'vant';

// 全局注册
Vue.use(Dialog);
Vue.use(Notify);
Vue.use(Vant);





Vue.config.productionTip = false
var vue = new Vue({
    router,
    render: h => h(App),
    created(){
        // px2rem
        (function (doc, win) {
            var domWidth = 750;
            var docEl = doc.documentElement,
                resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                recalc = function () {
                    var clientWidth = docEl.clientWidth;
                    if (!clientWidth) return;
                    docEl.style.fontSize = 100 * (clientWidth / domWidth) + 'px';
                };
            recalc();
            if (!doc.addEventListener) return;
            win.addEventListener(resizeEvt, recalc, false);
        })(document, window);
    }
}).$mount('#app')
